home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbattr2.arc / QBATTR2.PCH
Encoding:
Text File  |  1980-01-01  |  5.5 KB  |  182 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                        QuickBASIC 2.00 DISPLAY ATTRIBUTES
  27.                        ----------------------------------
  28.                                        by
  29.                                 Ian M. Beguesse
  30.                                    Tampa, FL
  31.                           ----------------------------
  32.                             QuickBASIC 2.01 updates
  33.                                        by
  34.                                    Tim Aaberg
  35.                                  Minnetonka, MN
  36.  
  37.  
  38.  
  39.  
  40.  
  41. Microsoft QuickBASIC Version 2.00 allows you to change the default
  42. foreground and background colors of the text, but nothing else.  The
  43. information in this file shows you how to use DEBUG to change the color
  44. attributes of any or all aspects of the QB display screen.
  45.  
  46.  
  47.  
  48.  
  49.  
  50. Use the following procedure for Version 2.00:
  51.  
  52. C>REN QB.EXE QB         ; Rename a copy of QB.EXE
  53.  
  54. C>DEBUG QB              ; Invoke the debugger
  55.  
  56. -R                      ; The registers are displayed.
  57.                         ; Note the DS register, say 'xxxx'
  58.  
  59. -H 2666 xxxx            ; This displays two hex numbers
  60.                         ; Note the first, say 'yyyy'
  61.  
  62. -RDS                    ; This allows you to change the DS register
  63. DS zzzz                 ; 'DS zzzz' is displayed
  64. :yyyy                   ; type 'yyyy', the first of the 2 hex numbers
  65.  
  66. -D 1A LC                ; This displays the color attribute bytes
  67.  
  68. -D 26 LC                ; This displays the monochrome attribute bytes
  69.  
  70.  
  71. The following table shows the locations, original contents and what
  72. they are used for.
  73.  
  74. ===== COLOR =====   ===== MONO ======
  75. -----------------------------------------------------------------
  76. LOCATION DEFAULT   LOCATION DEFAULT   USED FOR
  77. -----------------------------------------------------------------
  78.    1A      02         26      07      Border
  79.    1B      1C         27      07      Text
  80.    1C      74         28      07      Windows - border & headings
  81.    1D      74         29      07      Help border & CANCEL box
  82.    1E      71         2A      07      Windows - text
  83.    1F      30         2B      70      Menu - title bar
  84.    20      03         2C      07      Menu - selected title
  85.    21      02         2D      07      Menu - box outline
  86.    22      0F         2E      0F      Menu - bright text
  87.    23      07         2F      07      Menu - dim text
  88.    24      70         30      70      Menu - selected item
  89.    25      20         31      70      Scroll Bars
  90.  
  91.  
  92.  
  93. Use the following procedure for Version 2.01:
  94.  
  95. C>REN QB.EXE QB         ; Rename a copy of QB.EXE
  96.  
  97. C>DEBUG QB              ; Invoke the debugger
  98.  
  99. -R                      ; The registers are displayed.
  100.                         ; Note the DS register, say 'xxxx'
  101.  
  102. -H 26DD xxxx            ; This displays two hex numbers
  103.                         ; Note the first, say 'yyyy'
  104.  
  105. -RDS                    ; This allows you to change the DS register
  106. DS zzzz                 ; 'DS zzzz' is displayed
  107. :yyyy                   ; type 'yyyy', the first of the 2 hex numbers
  108.  
  109. -D 1E LC                ; This displays the color attribute bytes
  110.  
  111. -D 2A LC                ; This displays the monochrome attribute bytes
  112.  
  113.  
  114. The following table shows the locations, original contents and what
  115. they are used for.
  116.  
  117. ===== COLOR =====   ===== MONO ======
  118. -----------------------------------------------------------------
  119. LOCATION DEFAULT   LOCATION DEFAULT   USED FOR
  120. -----------------------------------------------------------------
  121.    1E      02         2A      07      Border
  122.    1F      1C         2B      07      Text
  123.    20      74         2C      07      Windows - border & headings
  124.    21      74         2D      07      Help border & CANCEL box
  125.    22      71         2E      07      Windows - text
  126.    23      30         2F      70      Menu - title bar
  127.    24      03         30      07      Menu - selected title
  128.    25      02         31      07      Menu - box outline
  129.    26      0F         32      0F      Menu - bright text
  130.    27      07         33      07      Menu - dim text
  131.    28      70         34      70      Menu - selected item
  132.    29      20         35      70      Scroll Bars
  133.  
  134.  
  135.  
  136. How to "read" attributes:
  137.  
  138. An attribute byte has two parts.  The background is given by the first
  139. hex character and the foreground by the second.  For example if the
  140. attribute is 74, 7 represents the background, and 4 represents the
  141. foreground color.  All the possible colors are these:
  142.  
  143. BACKGROUND or FOREGROUND:
  144.  
  145.               0      Black
  146.               1      Blue
  147.               2      Green
  148.               3      Cyan
  149.               4      Red
  150.               5      Magenta
  151.               6      Brown
  152.               7      White
  153.  
  154. FOREGROUND ONLY:
  155.  
  156.               8      Gray
  157.               9      Light Blue
  158.               A      Light Green
  159.               B      Light Cyan
  160.               C      Light Red
  161.               D      Light Magenta
  162.               E      Yellow
  163.               F      Bright White
  164.  
  165. To change an attribute, select the desired foreground and background.
  166. For example, bright white on red would be 4F.  Then make the change as
  167. follows.
  168.  
  169. -E aa bb                ; Where 'aa' is the location
  170.                         ; and 'bb' is the desired attribute.
  171.  
  172. When you are finished, type
  173.  
  174. -W                      ; This saves the changes
  175.  
  176. -Q                      ; Takes you back to DOS
  177.  
  178. C>REN QB QB.EXE         ; Restore original name.
  179.  
  180. Now execute 'QB' to see your changes in effect.
  181.  
  182.